// 书写一个路由表

import { lazy } from "react";

//!! l路由懒加载实现形式很多
//  1. const Home = () => import(/*webpackChunkName:'home'*/'xxx路径')
//  2. const Home = () => require.ensure(路径)
//  3. react中提供lazy
//      const Home = lazy(()= > import())

const roters = [
  {
    path: "/home",
    component: lazy(() => import("@/pages/home")),
    title: "首页",
    breadcrumb: {
      // 面包屑导航
      title: "Home"
    }
  },
  {
    path: "/about",
    title: "关于我们",
    component: lazy(() => import("@/pages/about")),
    breadcrumb: {
      title: "About"
    },
    icon: <WindowsOutlined />
  },
  {
    path: "/activite",
    component: lazy(() => import("@/pages/activite")),
    title: "活动",
    breadcrumb: {
      title: "Activite"
    },
    icon: <AppleOutlined />
  },
  {
    path: "/login",
    component: lazy(() => import("@/pages/login"))
  },
  {
    path: "/user-manger",
    component: lazy(() => import("@/pages/user-manger")),
    title: "用户管理",
    breadcrumb: {
      title: "UserManger"
    },
    icon: <GitlabOutlined />
  },
  {
    component: lazy(() => import("@/pages/not-found"))
  }
];
export default roters;
